import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: { 
    alias:{
      '@':path.resolve(__dirname,'./src'),
       'vue3-video-play': 'vue3-video-play/dist/index.umd.js'
    }
   },
   server: {
    host: '0.0.0.0', // 这个用于启动
    port: 8092, // 指定启动端口
    open: true, //启动后是否自动打开浏览器
    proxy: {
      '/api': {
         //target: 'http://kmapi.com/',
          target: 'https://api.kmanstage.com/',        
        changeOrigin: true,
      },
    }
  },
})
